package com.powernode.feign;

import com.powernode.domain.Sku;
import com.powernode.feign.hystrix.OrderSkuFeignHystrix;
import com.powernode.model.StockChange;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 内容:
 * 作者: cy
 */
@FeignClient(value = "product-service"  /*, fallback = OrderSkuFeignHystrix.class*/)
public interface OrderSkuFeign {

    @GetMapping("prod/prod/getSkuListByIds")
    List<Sku> getSkuListByIds(@RequestParam List<Long> skuIds);

    @PostMapping("prod/prod/changeStock")
    Boolean changeStock(@RequestBody StockChange stockChange);


}
